/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lambkit.module.cms.rpc.model.sql;

import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.column.Column;
import com.lambkit.db.sql.column.Columns;
import com.lambkit.db.sql.column.Example;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date 2020-03-02
 * @version 1.0
 * @since 1.0
 */
public class CmsAccessCriteria extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static CmsAccessCriteria create() {
		return new CmsAccessCriteria();
	}
	
	public static CmsAccessCriteria create(Column column) {
		CmsAccessCriteria that = new CmsAccessCriteria();
		that.add(column);
        return that;
    }

    public static CmsAccessCriteria create(String name, Object value) {
        return (CmsAccessCriteria) create().eq(name, value);
    }
    
    public Example example() {
    	return Example.create("cms_access", this);
    }
    
    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public CmsAccessCriteria like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public CmsAccessCriteria notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public CmsAccessCriteria le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public CmsAccessCriteria isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public CmsAccessCriteria notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public CmsAccessCriteria empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public CmsAccessCriteria notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public CmsAccessCriteria add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public CmsAccessCriteria andAccessIdIsNull() {
		isnull("access_id");
		return this;
	}
	
	public CmsAccessCriteria andAccessIdIsNotNull() {
		notNull("access_id");
		return this;
	}
	
	public CmsAccessCriteria andAccessIdIsEmpty() {
		empty("access_id");
		return this;
	}

	public CmsAccessCriteria andAccessIdIsNotEmpty() {
		notEmpty("access_id");
		return this;
	}
       public CmsAccessCriteria andAccessIdEqualTo(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.EQUAL, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdNotEqualTo(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.NOT_EQUAL, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdGreaterThan(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.GREATER_THEN, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdGreaterThanOrEqualTo(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.GREATER_EQUAL, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdLessThan(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.LESS_THEN, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdLessThanOrEqualTo(java.math.BigInteger value) {
          addCriterion("access_id", value, ConditionMode.LESS_EQUAL, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdBetween(java.math.BigInteger value1, java.math.BigInteger value2) {
    	  addCriterion("access_id", value1, value2, ConditionMode.BETWEEN, "accessId", "java.math.BigInteger", "String");
    	  return this;
      }

      public CmsAccessCriteria andAccessIdNotBetween(java.math.BigInteger value1, java.math.BigInteger value2) {
          addCriterion("access_id", value1, value2, ConditionMode.NOT_BETWEEN, "accessId", "java.math.BigInteger", "String");
          return this;
      }
        
      public CmsAccessCriteria andAccessIdIn(List<java.math.BigInteger> values) {
          addCriterion("access_id", values, ConditionMode.IN, "accessId", "java.math.BigInteger", "String");
          return this;
      }

      public CmsAccessCriteria andAccessIdNotIn(List<java.math.BigInteger> values) {
          addCriterion("access_id", values, ConditionMode.NOT_IN, "accessId", "java.math.BigInteger", "String");
          return this;
      }
	public CmsAccessCriteria andUserIdIsNull() {
		isnull("user_id");
		return this;
	}
	
	public CmsAccessCriteria andUserIdIsNotNull() {
		notNull("user_id");
		return this;
	}
	
	public CmsAccessCriteria andUserIdIsEmpty() {
		empty("user_id");
		return this;
	}

	public CmsAccessCriteria andUserIdIsNotEmpty() {
		notEmpty("user_id");
		return this;
	}
       public CmsAccessCriteria andUserIdEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdNotEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.NOT_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdGreaterThan(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdLessThan(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("user_id", value1, value2, ConditionMode.BETWEEN, "userId", "java.lang.Long", "Float");
    	  return this;
      }

      public CmsAccessCriteria andUserIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("user_id", value1, value2, ConditionMode.NOT_BETWEEN, "userId", "java.lang.Long", "Float");
          return this;
      }
        
      public CmsAccessCriteria andUserIdIn(List<java.lang.Long> values) {
          addCriterion("user_id", values, ConditionMode.IN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andUserIdNotIn(List<java.lang.Long> values) {
          addCriterion("user_id", values, ConditionMode.NOT_IN, "userId", "java.lang.Long", "Float");
          return this;
      }
	public CmsAccessCriteria andReftypeIsNull() {
		isnull("reftype");
		return this;
	}
	
	public CmsAccessCriteria andReftypeIsNotNull() {
		notNull("reftype");
		return this;
	}
	
	public CmsAccessCriteria andReftypeIsEmpty() {
		empty("reftype");
		return this;
	}

	public CmsAccessCriteria andReftypeIsNotEmpty() {
		notEmpty("reftype");
		return this;
	}
       public CmsAccessCriteria andReftypeEqualTo(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.EQUAL, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeNotEqualTo(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.NOT_EQUAL, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeGreaterThan(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.GREATER_THEN, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeGreaterThanOrEqualTo(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.GREATER_EQUAL, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeLessThan(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.LESS_THEN, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeLessThanOrEqualTo(java.lang.Integer value) {
          addCriterion("reftype", value, ConditionMode.LESS_EQUAL, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeBetween(java.lang.Integer value1, java.lang.Integer value2) {
    	  addCriterion("reftype", value1, value2, ConditionMode.BETWEEN, "reftype", "java.lang.Integer", "Float");
    	  return this;
      }

      public CmsAccessCriteria andReftypeNotBetween(java.lang.Integer value1, java.lang.Integer value2) {
          addCriterion("reftype", value1, value2, ConditionMode.NOT_BETWEEN, "reftype", "java.lang.Integer", "Float");
          return this;
      }
        
      public CmsAccessCriteria andReftypeIn(List<java.lang.Integer> values) {
          addCriterion("reftype", values, ConditionMode.IN, "reftype", "java.lang.Integer", "Float");
          return this;
      }

      public CmsAccessCriteria andReftypeNotIn(List<java.lang.Integer> values) {
          addCriterion("reftype", values, ConditionMode.NOT_IN, "reftype", "java.lang.Integer", "Float");
          return this;
      }
	public CmsAccessCriteria andRefidIsNull() {
		isnull("refid");
		return this;
	}
	
	public CmsAccessCriteria andRefidIsNotNull() {
		notNull("refid");
		return this;
	}
	
	public CmsAccessCriteria andRefidIsEmpty() {
		empty("refid");
		return this;
	}

	public CmsAccessCriteria andRefidIsNotEmpty() {
		notEmpty("refid");
		return this;
	}
       public CmsAccessCriteria andRefidEqualTo(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.EQUAL, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidNotEqualTo(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.NOT_EQUAL, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidGreaterThan(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.GREATER_THEN, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.GREATER_EQUAL, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidLessThan(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.LESS_THEN, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("refid", value, ConditionMode.LESS_EQUAL, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("refid", value1, value2, ConditionMode.BETWEEN, "refid", "java.lang.Long", "Float");
    	  return this;
      }

      public CmsAccessCriteria andRefidNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("refid", value1, value2, ConditionMode.NOT_BETWEEN, "refid", "java.lang.Long", "Float");
          return this;
      }
        
      public CmsAccessCriteria andRefidIn(List<java.lang.Long> values) {
          addCriterion("refid", values, ConditionMode.IN, "refid", "java.lang.Long", "Float");
          return this;
      }

      public CmsAccessCriteria andRefidNotIn(List<java.lang.Long> values) {
          addCriterion("refid", values, ConditionMode.NOT_IN, "refid", "java.lang.Long", "Float");
          return this;
      }
	public CmsAccessCriteria andAccessTimeIsNull() {
		isnull("access_time");
		return this;
	}
	
	public CmsAccessCriteria andAccessTimeIsNotNull() {
		notNull("access_time");
		return this;
	}
	
	public CmsAccessCriteria andAccessTimeIsEmpty() {
		empty("access_time");
		return this;
	}

	public CmsAccessCriteria andAccessTimeIsNotEmpty() {
		notEmpty("access_time");
		return this;
	}
       public CmsAccessCriteria andAccessTimeEqualTo(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.EQUAL, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeNotEqualTo(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.NOT_EQUAL, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeGreaterThan(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.GREATER_THEN, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeGreaterThanOrEqualTo(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.GREATER_EQUAL, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeLessThan(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.LESS_THEN, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeLessThanOrEqualTo(java.util.Date value) {
          addCriterion("access_time", value, ConditionMode.LESS_EQUAL, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeBetween(java.util.Date value1, java.util.Date value2) {
    	  addCriterion("access_time", value1, value2, ConditionMode.BETWEEN, "accessTime", "java.util.Date", "String");
    	  return this;
      }

      public CmsAccessCriteria andAccessTimeNotBetween(java.util.Date value1, java.util.Date value2) {
          addCriterion("access_time", value1, value2, ConditionMode.NOT_BETWEEN, "accessTime", "java.util.Date", "String");
          return this;
      }
        
      public CmsAccessCriteria andAccessTimeIn(List<java.util.Date> values) {
          addCriterion("access_time", values, ConditionMode.IN, "accessTime", "java.util.Date", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTimeNotIn(List<java.util.Date> values) {
          addCriterion("access_time", values, ConditionMode.NOT_IN, "accessTime", "java.util.Date", "String");
          return this;
      }
	public CmsAccessCriteria andAccessTypeIsNull() {
		isnull("access_type");
		return this;
	}
	
	public CmsAccessCriteria andAccessTypeIsNotNull() {
		notNull("access_type");
		return this;
	}
	
	public CmsAccessCriteria andAccessTypeIsEmpty() {
		empty("access_type");
		return this;
	}

	public CmsAccessCriteria andAccessTypeIsNotEmpty() {
		notEmpty("access_type");
		return this;
	}
        public CmsAccessCriteria andAccessTypeLike(java.lang.String value) {
    	   addCriterion("access_type", value, ConditionMode.FUZZY, "accessType", "java.lang.String", "String");
    	   return this;
      }

      public CmsAccessCriteria andAccessTypeNotLike(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.NOT_FUZZY, "accessType", "java.lang.String", "String");
          return this;
      }
      public CmsAccessCriteria andAccessTypeEqualTo(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.EQUAL, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeNotEqualTo(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.NOT_EQUAL, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeGreaterThan(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.GREATER_THEN, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeGreaterThanOrEqualTo(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.GREATER_EQUAL, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeLessThan(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.LESS_THEN, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeLessThanOrEqualTo(java.lang.String value) {
          addCriterion("access_type", value, ConditionMode.LESS_EQUAL, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeBetween(java.lang.String value1, java.lang.String value2) {
    	  addCriterion("access_type", value1, value2, ConditionMode.BETWEEN, "accessType", "java.lang.String", "String");
    	  return this;
      }

      public CmsAccessCriteria andAccessTypeNotBetween(java.lang.String value1, java.lang.String value2) {
          addCriterion("access_type", value1, value2, ConditionMode.NOT_BETWEEN, "accessType", "java.lang.String", "String");
          return this;
      }
        
      public CmsAccessCriteria andAccessTypeIn(List<java.lang.String> values) {
          addCriterion("access_type", values, ConditionMode.IN, "accessType", "java.lang.String", "String");
          return this;
      }

      public CmsAccessCriteria andAccessTypeNotIn(List<java.lang.String> values) {
          addCriterion("access_type", values, ConditionMode.NOT_IN, "accessType", "java.lang.String", "String");
          return this;
      }
}